<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateGoodsTable extends Migration
{
    //提交
    public function up()
    {
        Schema::create('goods', function (Blueprint $table) {

                $table->increments('id');
                $table->timestamps();
                $table->string('title')->comment('商品名称|input');
                $table->smallInteger('goodprice')->comment('市场价|input');
                $table->smallInteger('mallprice')->comment('商城价|input');
                $table->integer('cate_id')->comment('商品所属分类');
                $table->string('can_id')->comment('商品可用属性');
                $table->string('brand_id')->comment('品牌id');
                $table->text('pics')->comment('商品图片');
                $table->text('content')->comment('商品详情');
                $table->tinyInteger('iscommend')->default(0)->comment('是否推荐|radio|1:是,0:否');
        });
    }

    //回滚
    public function down()
    {
        Schema::dropIfExists('goods');
    }
}
